/*
 * Bullet.h
 *
 *  Created on: 31/10/2011
 *      Author: andrea
 */


#ifndef BULLET_H_
#define BULLET_H_


#include "../Widget.h"
#include "../Event.h"
#include <math.h>

#define PI 3.14159265
#define PIXELS_PER_MOVE 8


class Bullet : public Widget{
private:
	SDL_Surface* bullet;
	int nextX;
	int nextY;

	int delthaX;
	int delthaY;

	double angle;
	bool drawable;

	void setDeltha();
	void setPosition();

protected:

	Bullet();

public:

	Bullet(int posX, int posY, Widget *parent, double angle);

	virtual void handleEvent(Event event);

	virtual void resolve();

	virtual void showOn(SDL_Surface* surface);

	bool isDrawable();



	virtual ~Bullet();
};

#endif /* BULLET_H_ */
